.class public Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;
.super Lcom/waiqin365/lightapp/kehu/view/CMCustomView;

# interfaces
.implements Ljava/util/Observer;


# instance fields
.field private a:Landroid/content/Context;

.field private b:Landroid/app/Activity;

.field private c:Landroid/widget/LinearLayout;

.field private d:Landroid/widget/TextView;

.field private e:Lcom/waiqin365/lightapp/b/c;

.field private f:Landroid/view/View;

.field private g:Lcom/waiqin365/lightapp/view/gn;


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 0

    invoke-direct {p0, p1, p2}, Lcom/waiqin365/lightapp/kehu/view/CMCustomView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    invoke-direct {p0, p1}, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->a(Landroid/content/Context;)V

    return-void
.end method

.method private a(Landroid/content/Context;)V
    .locals 3

    iput-object p1, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->a:Landroid/content/Context;

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->a:Landroid/content/Context;

    check-cast v0, Landroid/app/Activity;

    iput-object v0, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->b:Landroid/app/Activity;

    new-instance v0, Lcom/waiqin365/lightapp/b/c;

    invoke-direct {v0}, Lcom/waiqin365/lightapp/b/c;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->e:Lcom/waiqin365/lightapp/b/c;

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->a:Landroid/content/Context;

    const v1, 0x7f0301c5

    const/4 v2, 0x0

    invoke-static {v0, v1, v2}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    invoke-virtual {p0, v1}, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->addView(Landroid/view/View;)V

    const v0, 0x7f0c09a1

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->c:Landroid/widget/LinearLayout;

    const v0, 0x7f0c09a3

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->d:Landroid/widget/TextView;

    const v0, 0x7f0c0083

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->f:Landroid/view/View;

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->c:Landroid/widget/LinearLayout;

    new-instance v1, Lcom/waiqin365/lightapp/view/gm;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightapp/view/gm;-><init>(Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;)V

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-void
.end method

.method private a(Landroid/content/Context;Landroid/content/Intent;)V
    .locals 2

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->d:Landroid/widget/TextView;

    if-eqz v0, :cond_0

    if-eqz p2, :cond_0

    const-string/jumbo v0, "picType"

    invoke-virtual {p2, v0}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/b/c;

    iput-object v0, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->e:Lcom/waiqin365/lightapp/b/c;

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->e:Lcom/waiqin365/lightapp/b/c;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->e:Lcom/waiqin365/lightapp/b/c;

    iget-object v0, v0, Lcom/waiqin365/lightapp/b/c;->a:Ljava/lang/String;

    if-eqz v0, :cond_1

    const-string/jumbo v0, "0"

    iget-object v1, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->e:Lcom/waiqin365/lightapp/b/c;

    iget-object v1, v1, Lcom/waiqin365/lightapp/b/c;->a:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_1

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->d:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->e:Lcom/waiqin365/lightapp/b/c;

    iget-object v1, v1, Lcom/waiqin365/lightapp/b/c;->b:Ljava/lang/String;

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->d:Landroid/widget/TextView;

    const-string/jumbo v1, ""

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_0
.end method

.method static synthetic a(Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;)V
    .locals 0

    invoke-direct {p0}, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->f()V

    return-void
.end method

.method private f()V
    .locals 3

    invoke-static {}, Lcom/waiqin365/lightapp/view/a/b;->a()Ljava/util/Observable;

    move-result-object v0

    invoke-virtual {v0, p0}, Ljava/util/Observable;->addObserver(Ljava/util/Observer;)V

    new-instance v0, Landroid/content/Intent;

    iget-object v1, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->b:Landroid/app/Activity;

    const-class v2, Lcom/waiqin365/lightapp/photo/PhotoTypeSelectActivity;

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string/jumbo v1, "picType"

    iget-object v2, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->e:Lcom/waiqin365/lightapp/b/c;

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;

    const-string/jumbo v1, "returnTo"

    iget-object v2, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->n:Ljava/lang/String;

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    iget-object v1, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->b:Landroid/app/Activity;

    invoke-virtual {v1, v0}, Landroid/app/Activity;->startActivity(Landroid/content/Intent;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->b:Landroid/app/Activity;

    const v1, 0x7f040022

    const v2, 0x7f040021

    invoke-virtual {v0, v1, v2}, Landroid/app/Activity;->overridePendingTransition(II)V

    return-void
.end method


# virtual methods
.method public b(Z)V
    .locals 2

    iget-object v1, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->f:Landroid/view/View;

    if-eqz p1, :cond_0

    const/4 v0, 0x0

    :goto_0
    invoke-virtual {v1, v0}, Landroid/view/View;->setVisibility(I)V

    return-void

    :cond_0
    const/4 v0, 0x4

    goto :goto_0
.end method

.method public e()Lcom/waiqin365/lightapp/b/c;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->e:Lcom/waiqin365/lightapp/b/c;

    return-object v0
.end method

.method public setContent(Ljava/lang/CharSequence;)V
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->d:Landroid/widget/TextView;

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    return-void
.end method

.method public setDataChangeListener(Lcom/waiqin365/lightapp/view/gn;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->g:Lcom/waiqin365/lightapp/view/gn;

    return-void
.end method

.method public setPicType(Lcom/waiqin365/lightapp/b/c;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->e:Lcom/waiqin365/lightapp/b/c;

    return-void
.end method

.method public update(Ljava/util/Observable;Ljava/lang/Object;)V
    .locals 2

    if-eqz p2, :cond_0

    instance-of v0, p2, Lcom/waiqin365/lightapp/view/a/a;

    if-eqz v0, :cond_0

    iget-object v1, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->n:Ljava/lang/String;

    move-object v0, p2

    check-cast v0, Lcom/waiqin365/lightapp/view/a/a;

    iget-object v0, v0, Lcom/waiqin365/lightapp/view/a/a;->a:Ljava/lang/String;

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    move-object v0, p2

    check-cast v0, Lcom/waiqin365/lightapp/view/a/a;

    iget-object v0, v0, Lcom/waiqin365/lightapp/view/a/a;->b:Ljava/lang/Object;

    instance-of v0, v0, Landroid/content/Intent;

    if-eqz v0, :cond_0

    check-cast p2, Lcom/waiqin365/lightapp/view/a/a;

    iget-object v0, p2, Lcom/waiqin365/lightapp/view/a/a;->b:Ljava/lang/Object;

    check-cast v0, Landroid/content/Intent;

    invoke-static {}, Lcom/waiqin365/lightapp/view/a/b;->a()Ljava/util/Observable;

    move-result-object v1

    invoke-virtual {v1, p0}, Ljava/util/Observable;->deleteObserver(Ljava/util/Observer;)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->a:Landroid/content/Context;

    invoke-direct {p0, v1, v0}, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->a(Landroid/content/Context;Landroid/content/Intent;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->g:Lcom/waiqin365/lightapp/view/gn;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/view/PhotoTypeSelectSingleView;->g:Lcom/waiqin365/lightapp/view/gn;

    invoke-interface {v0}, Lcom/waiqin365/lightapp/view/gn;->a()V

    :cond_0
    return-void
.end method
